<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Services\WorkkefuService;

class Worklinkmsg implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
    protected $msgLists;
    protected $corp_id;
    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($msgLists,$corp_id)
    {
        $this->msgLists = $msgLists;
        $this->corp_id = $corp_id;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        // 调用批量处理脚本
        WorkkefuService::msgListsHanddle($this->msgLists,$this->corp_id);
    }
}
